{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Special case: evaporation of water\n", "**TL;DR:** Estimation of rates and yields is an important step in characterization and selection of cell factories and bioprocess. Evaporation of water from the bioreactor will bias the estimated yields and rates. Using the Pseudo batch transformation one can estimate the correct values when evaporation is significant.\n", "\n", "## Why care about evaporation?\n", "Evaporation of water from a bioreactor will bias the estimated titer, rates and yields if it is not properly accounted for. As a motivating example, imagine a batch bioreactor with an initial volume of 100 ml. When analysing batch processes it is common to assume that any change in concentration is caused by the metabolic activity of the organism in the reactor. However, if 10 ml water evaporated during the process this would cause a significant increase in concentration which is unrelated to the metabolic activity. As result the production rates will appear larger causing the strains to look more attractive, than reality.\n", "\n", "Evaporation can vary a lot between different bioreactor equipment and scales, thus evaporation could very well take a part of the blame for the performance variation of cell factories at different scales. The cause of the varying evaporation is multifaceted and can originate from dryness of process air, presence of condensers, differences in agitation method, etc [1]. Thus, the same strain can appear to perform differently in between cultivation setups if evaporation is not accounted for in the bioreactor volume.\n", "\n", "For fed-batch fermentations, evaporation adds an additional source of volume change. The Pseudo batch transformation can handle scenarios where evaporation is significant, however to get accurate estimates of rates and yields the transformation method needs the true volume of the bioreactor. The true volume data may not always be accessible. This tutorial have two objectives\n", "1. Show that the Pseudo batch transformation method works when water evaporation is significant \n", "2. Illustrate a common scenario where the evaporation is not accounted for in the volume data." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Before we start we will first load the necessary Python packages and functions." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "import numpy as np\n", "\n", "from pseudobatch import pseudobatch_transform_pandas\n", "from pseudobatch.datasets import load_evaporation_fedbatch" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Pseudo batch transformation works when evaporation is significant\n", "The `pseudobatch` package holds an example dataset which is produced to mimic a fed-batch process with an exponential feeding profile where water evaporates from the bioreactor at a constant rate (The simulation script are found in https://github.com/biosustain/pseudobatch/article/simulation_scripts/fed-batch_evaporation.jl). This data is loaded in the code block below. We also show some of the data columns to give an overview of the structure of this data frame." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | timestamp | \n", "sample_volume | \n", "c_Glucose | \n", "c_Biomass | \n", "c_Product | \n", "c_CO2 | \n", "v_Volume | \n", "v_Feed_accum | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "0.00000 | \n", "0.0 | \n", "0.075000 | \n", "0.500000 | \n", "0.000000 | \n", "0.0 | \n", "1000.000000 | \n", "0.000000 | \n", "
1 | \n", "0.06006 | \n", "0.0 | \n", "0.075004 | \n", "0.503014 | \n", "0.002474 | \n", "0.0 | \n", "999.995704 | \n", "0.055765 | \n", "
2 | \n", "0.12012 | \n", "0.0 | \n", "0.075009 | \n", "0.506047 | \n", "0.004964 | \n", "0.0 | \n", "999.991745 | \n", "0.111865 | \n", "
3 | \n", "0.18018 | \n", "0.0 | \n", "0.075013 | \n", "0.509097 | \n", "0.007469 | \n", "0.0 | \n", "999.988123 | \n", "0.168303 | \n", "
4 | \n", "0.24024 | \n", "0.0 | \n", "0.075016 | \n", "0.512166 | \n", "0.009988 | \n", "0.0 | \n", "999.984842 | \n", "0.225082 | \n", "